class CreateUser < ActiveRecord::Migration
  def change
    create_table :users do |t|
      t.string :mobile, limit: 11
      t.string :name
      t.string :username
      t.string :password_digest
      t.string :user_type, limit: 1
      t.boolean :is_active, default: false

      t.timestamps null: false
    end

    add_index :users, :mobile
    add_index :users, :name
    add_index :users, :user_type
  end
end
